1. Technical Field
The present invention relates to an image processing device, an image forming device, and an image processing method.
2. Related Art
An image forming device which employs an electrophotographic method sometimes causes a problem of blurring at boundary parts of electrostatic latent images due to characteristics of photosensitive materials. Consequently, lines formed on a surface of a recording material become thick. For example, small letters of a 5-point size or smaller collapse and become illegible. As methods for suppressing such blurred electrostatic latent images, downsizing of a beam aperture used in exposure, and thinning of photosensitive film thickness are commonly known. In addition to these methods, there has been developed a technique for narrowing lines and suppressing collapse of letters by controlling image data.
FIG. 11 is a flowchart showing a flow of line-thinning processing which is commonly used in a printer based on an image forming device of an electrophotographic scheme, in case that raster resolution is lower than that of an image forming device. In this flowchart and the description made below, a unit “dpi” is used as an index for indicating a resolution. This unit indicates dot/inch, i.e., a number of pixels per inch.
The image forming device firstly performs rasterization to convert image data written in a page description language (hereinafter PDL) into a raster image of 600 dpi (step Sc01). Next, the raster image is further converted into a raster image of 2,400 dpi by a resolution conversion (step Sc02). The resolution conversion simply functions to raise a resolution of a raster image. By this function, a raster image is obtained so as to match a resolution used in image formation. Where a raster image of 600 dpi is converted into a raster image of 2,400 dpi, each pixel as a minimum unit forming part of the raster image of 600 dpi is expressed by 16 pixels of 4×4 in the raster image of 2,400 dpi. The raster image of 2,400 dpi which is obtained in this manner is subjected to line-thinning by a line-thinning processing (step Sc03), and is then subjected to an image forming processing (step Sc04). Accordingly, an image of 2,400 dpi, which corresponds to the raster image subjected to line-thinning, is formed on a surface of a recording material such as a paper sheet.
The line-thinning processing will now be described. In the line-thinning processing, a raster image is inspected for each pixel. If a pixel group including plural pixels including a pixel being inspected satisfies a predetermined condition, the pixel is replaced with a background image pixel which is a pixel of a different color, thereby to achieve line-thinning for an image. There are various known methods for line-thinning processings. As examples of the known methods, a contraction algorithm and a Hilditch thinning algorithm will now be described below.
FIG. 12A shows a window used for a line-thinning processing. The window shown in this figure is an array of 3 pixels×3 pixels (3 rows×3 columns) in which a target pixel P0 in the center of the array is surrounded by peripheral pixels P1 to P8. The number of pixels constituting one edge of the window including a pixel group of the 3 pixels×3 pixels will be referred to as a “window size w”. Accordingly, the window size of this window is “3”. In the contraction algorithm and the Hilditch thinning algorithm, a relationship between the peripheral pixels P1 to P8 and the target pixel P0 is inspected. If the relationship satisfies a predetermined condition, the target pixel P0 is regarded as a deletion candidate, i.e., a replacement candidate to be replaced with a pixel of a different color.
FIG. 12B illustrates scanning executed on a raster image. Blocks divided by a grid shown in this figure respectively correspond to pixels constituting the raster image. The pixels included in the raster image are inspected sequentially, one after another, along an arrow Rs shown in the figure. That is, the pixels are scanned in a main scanning direction (a rightward direction from the left side to the right side of the figure, i.e., the direction of “rows”). When inspection is completed up to the right end of a row as a scanning line, the inspection then returns to the left end, and the scanning line to be inspected is shifted by one pixel in a sub scanning direction to a next row (a downward direction from upside to downside of the figure, i.e., the direction of “columns”). Inspection is further carried out on pixels on this next row, which are sequentially regarded one after another as target pixels. Pixels which are determined as deletion candidates by the inspection as described above are replaced all at once with pixels of a background color, e.g., white pixels.
FIG. 12C shows a method for determining a deletion candidate in the contraction algorithm. In the contraction algorithm, the target pixel P0 is a pixel having a black color (hereinafter “black pixel”). If at least one of the peripheral pixels P1 to P8 is a pixel having a white color (hereinafter “white pixel”), the target pixel P0 is determined as being a deletion candidate pixel. For example, as shown in the left array in FIG. 12C, if a pixel existing on the upper left of a target pixel P0 is a white pixel, i.e., if the peripheral pixel P4 is a white pixel, the target pixel P0 is regarded as a deletion candidate pixel and is replaced with a white pixel after a deletion processing, as shown in the right array in the figure.
FIG. 13 show changes of line widths in images according to a line-thinning processing which employ the contraction algorithm. In each of FIGS. 13A to 13F, each of blocks divided by a grid of solid lines corresponds to one pixel at a resolution of 2,400 dpi. Each of the blocks divided by a grid of thick lines corresponds to one pixel at a resolution of 600 dpi. If a raster image at a resolution of 600 dpi is converted into a raster image at a resolution of 2,400 dpi, 4 pixels×4 pixels are a minimum unit in the raster image obtained by the conversion. Now, a numerical value indicating the number of pixels constituting one edge of the minimum unit in the converted raster image is referred to as an “edge size”. Accordingly, the edge size e is “4” for an image obtained by resolution conversion from 600 dpi to 2,400 dpi.
For example, FIG. 13A shows a state that a vertical stripe image including a stripe having a line width of one pixel at 600 dpi is converted into a raster image at 2,400 dpi by a resolution conversion. The vertical stripe image expresses a vertical stripe extending in a direction parallel to the sub scanning direction as described in FIG. 12B. In descriptions made below, a horizontal stripe image is an image in which a stripe extends in the main scanning direction described in FIG. 12B. An oblique stripe image is an image in which a stripe extends in a direction which is parallel to neither the main scanning direction nor the sub scanning directions.
In case of FIG. 13A, an image obtained by a resolution conversion is a vertical stripe image of a stripe having a line width equivalent to four pixels at 2,400 dpi, as shown in the figure. If the contraction algorithm is performed one time on the vertical stripe image, the stripe is thinned to a line width equivalent to two pixels at 2,400 dpi, as shown in FIG. 13B. Similarly, FIG. 13C shows a horizontal stripe image of a stripe having a line width equivalent to one pixel at a resolution of 600 dpi. The horizontal stripe image is subjected to a resolution conversion to 2,400 dpi, and the contraction algorithm is then performed one time on the converted image. As a result, the stripe in the horizontal stripe image is thinned to a line width of two pixels at 2,400 dpi, as shown in FIG. 13D. If the contraction algorithm is further performed one time on the vertical and horizontal stripe images shown in FIGS. 13B and 13D in which vertical and horizontal stripes having a line width equivalent to two pixels, all pixels then become white pixels and the stripes disappear.
FIG. 13E shows an oblique stripe image in which a stripe has a width equivalent to one pixel at 600 dpi. If the contraction algorithm described above is performed one time on the oblique stripe image, an image shown in FIG. 13F is obtained in which discrete dots each including 2 pixels×2 pixels are arranged obliquely in line. This is because the oblique stripe has become discontinuous after executing the contraction algorithm one time. If the contraction algorithm is further performed one time on the image shown in FIG. 13F, all pixels then become white pixels, and the stripe disappears.
Next, the Hilditch thinning algorithm will be described in brief In the Hilditch thinning algorithm, a target pixel P0 is regarded as a deletion candidate if the following six conditions are satisfied by a relationship of a target pixel P0 with peripheral pixels P1 to P8 in the window of 3 pixels×3 pixels as shown in FIG. 12A.
Condition 1: The target pixel P0 is a shape element (e.g., the target pixel has a color different from white pixels forming a background).
Condition 2: The target pixel P0 is a boundary point.
Condition 3: The target pixel P0 is not an end point.
Condition 4: The target pixel P0 is not an isolated dot.
Condition 5: Continuity is maintained between peripheral pixels even if the target pixel P0 is deleted.
Condition 6: Provided that the target pixel P0 forms part of a stripe having a line width equivalent to two pixels, only one side of the stripe disappears if the target pixel P0 is deleted.
FIG. 14 show images subjected to line-thinning by the Hilditch thinning algorithm. Where the Hilditch thinning algorithm is performed one time on the vertical stripe image shown in FIG. 13A, the vertical stripe image as shown in FIG. 13B is obtained as a result of line-thinning. If the vertical stripe image shown in FIG. 13B is further subjected to line-thinning by the Hilditch thinning algorithm, a vertical stripe image as shown in FIG. 14A is obtained. That is, so far as a vertical stripe image is concerned, a stripe in the vertical stripe image neither becomes discontinuous nor disappears even after the Hilditch thinning algorithm is performed twice. Similarly, a horizontal stripe image as shown in FIG. 13D is obtained by performing line-thinning according to the Hilditch thinning algorithm on the horizontal stripe image shown in FIG. 13C. If line-thinning is further performed on the horizontal stripe image as shown in FIG. 13D, a horizontal stripe image as shown in FIG. 14B is obtained, and thus, a horizontal stripe in a horizontal stripe image neither becomes discontinuous nor disappears.
Meanwhile, if the Hilditch thinning algorithm is performed one time on the oblique stripe image shown in FIG. 13E, an oblique stripe in a resultant image becomes discontinuous, e.g., divided into discrete stripe segments as shown in FIG. 14C. If line-thinning is further performed on the resultant image, an image shown in FIG. 14D is obtained, and thus, intervals enlarge between discrete oblique stripe segments. Thus, if a raster image at a resolution of 600 dpi is converted into a raster image of a resolution of 2,400 dpi, which is then subjected to line-thinning based on the Hilditch thinning algorithm, line-thinning is achieved successfully without making stripes discontinuous so far as vertical and horizontal stripe images are concerned. However, in case of an oblique stripe image, an oblique stripe in the image becomes discontinuous by performing a line-thinning processing only one time.
As has been described above, if line-thinning with use of a window size w=3 is carried out after converting a raster image rasterized at 600 dpi into a raster image at 2,400 dpi, there is a case that content of the image disappears by employing the contraction algorithm. Also, in case of employing the Hilditch thinning algorithm, there is a case that an oblique stripe in an image becomes discontinuous.